# Contributor: Andrey Pustovetov <andrey.pustovetov@gmail.com>
# Maintainer: Andrey Pustovetov <andrey.pustovetov@gmail.com>
pkgname=kcat
pkgver=1.7.0
pkgrel=0
pkgdesc="Generic command-line non-JVM Apache Kafka producer and consumer"
url="https://github.com/edenhill/kafkacat"
arch="all"
makedepends="bash yajl-dev librdkafka-dev"
license="BSD-2-Clause"
options="!check" # upstream doesn't have a test suite
source="$pkgname-$pkgver.tar.gz::https://github.com/edenhill/kafkacat/archive/$pkgver.tar.gz"

# Backwards compatibility
replaces="kafkacat"
provides="kafkacat=$pkgver-r$pkgrel"

build() {
	./configure \
		--prefix=/usr \
		--mandir=/usr/share/man \
		--enable-json
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
1bb442600e031baf433ef0e864a36b0d5d785127cfe811e4132b929ac06956641f5f4054d8edce26a4f1cba7b11c610a09ea76c5a2cfcda82f6fc5f5aada9424  kcat-1.7.0.tar.gz
"
